package ezXpns.GUI;

import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import net.miginfocom.swing.MigLayout;
import javax.swing.JLabel;
import java.awt.Font;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;


/**
 * @author A0086931X
 */
public class AboutGUI extends JDialog {

	private final JPanel contentPanel = new JPanel();

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		try {
			AboutGUI dialog = new AboutGUI();
			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
			dialog.setVisible(true);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Create the dialog.
	 */
	public AboutGUI() {
		setBounds(100, 100, 450, 300);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		contentPanel.setLayout(new MigLayout("", "[grow,center]", "[][][][][][][][]"));
		{
			JLabel lblEzxpnsBudgetManagement = new JLabel("EzXpns Budget Management Tool");
			lblEzxpnsBudgetManagement.setFont(new Font("SansSerif", Font.BOLD, 18));
			contentPanel.add(lblEzxpnsBudgetManagement, "cell 0 0");
		}
		{
			JLabel lblV = new JLabel("v0.1.1");
			contentPanel.add(lblV, "cell 0 1");
		}
		{
			JLabel lblTeamMembers = new JLabel("Team Members:");
			contentPanel.add(lblTeamMembers, "cell 0 3");
		}
		{
			JLabel lblJinZhe = new JLabel("Jin Zhe");
			contentPanel.add(lblJinZhe, "cell 0 4");
		}
		{
			JLabel lblLeVietBach = new JLabel("Le Viet Bach");
			contentPanel.add(lblLeVietBach, "cell 0 5");
		}
		{
			JLabel lblNgZhengHan = new JLabel("Ng Zheng Han");
			contentPanel.add(lblNgZhengHan, "cell 0 6");
		}
		{
			JLabel lblRyanChan = new JLabel("Ryan Chan");
			contentPanel.add(lblRyanChan, "cell 0 7");
		}
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
			getContentPane().add(buttonPane, BorderLayout.SOUTH);
			{
				JButton okButton = new JButton("OK");
				okButton.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent e) {
						dispose();
					}
				});
				okButton.setActionCommand("OK");
				buttonPane.add(okButton);
				getRootPane().setDefaultButton(okButton);
			}
		}
	}

	private static final long serialVersionUID = 1L;
}
